<?php
	//判断用户是否登录
	session_start();
	if(isset($_SESSION['studentInfo'])){
		//用户已经登录
	} else {
		//跳转到登录界面
		header("Location:http://localhost/SelectCoursesSystem/RegisterLogin.php");
}
//require_once '../../config.php';
require_once dirname(__FILE__).'/../../controller/StudentController.class.php';
/*  if(!defined('APP')) die('error!'); */?>
<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
	<title>欢迎进入学生选课系统(学生)</title>
	</head>
	<link rel="stylesheet" href="../../css/student_view.css" type="text/css"/>
	<body>
		<!-- 标题头 -->
		<div class="main_head_class">
			<div class="main_head_show_class">
				<p>欢迎您进入学生选课系统</p>
			</div>
		</div>
		<!-- 背景面板 -->
		<div class="main_student_info_class">
			<!-- 学生信息 -->
			<div class="student_info_class">
				<!-- 头像以及头像背景图 -->
				<div class="student_info_head_class">
					<!-- 头像上背景颜色 -->
					<div class="student_info_head_first">
					</div>
					<div class="student_info_head_img_class">
						<img alt="" src="../../images/head.jpg">
					</div>
				</div>
				<!-- 选课、退选课操作 -->
				<div class="student_operator_class">
					<ul>
						<li><p class="IAmSuper_class">(我是学生)</p>
						<li><a id="current" href="javascript:void(0)">当前选课信息</a></li>
						<li><a id="can" href="javascript:void(0)">可选课程信息</a></li>
					</ul>
				</div>
			</div>
			
			<!-- 课程对应的选课信息 -->
			<div class="main_student_courses_info">
				<div class="student_courses_info_backgroud">
					<div class="student_courses_info">
					<!-- 加载两个模板 -->
					<div id="current_div">
						<?php include_once dirname(__FILE__).'/StudentSelectedCourses.php';?>
					</div>
					<div id="can_div" style="display:none;">
						<?php include_once dirname(__FILE__).'/StudentSelectCourse.php';?>
					</div>
					<!-- 显示所选课程或是可选课程 -->
					<script type="text/javascript">
					/* 所选课程 */
					document.getElementById("current").onclick = function(){
						document.getElementById("current_div").style='display:block';
						document.getElementById("can_div").style='display:none';	
					}
					/* 可选课程 */
					document.getElementById("can").onclick = function(){
						document.getElementById("current_div").style='display:none';	
						document.getElementById("can_div").style='display:block';
					}		
					</script>
					</div>
				</div>
			</div>
			
		</div>
	</body>
</html>